<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="__PUBLIC__/admin/sncss/css/style.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/admin/sncss/css/combo.select.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="__PUBLIC__/admin/sncss/css/ios6switch.css" />
</head>

<body>

	<div class="place">
	<span>位置：</span>
	<ul class="placeul">
	<li><a>首页</a></li>
	<li><a>主播管理</a></li>
	<li><a>主播列表</a></li>
	</ul>
	</div>

	<div class="formbody">

	<div class="formtitle"><span>主播信息</span></div>
	  <form id="formid" name="form1" method="post" action="{:U('/Home/User/user_edit')}">
	  <input name="uuid"  type="hidden" class="dfinput" value="{$userdata['uuid']}" />
		<input name="p"  type="hidden" class="dfinput" value="{$p}" />
		<input name="authkey"  type="hidden" class="dfinput" value="{$authkey}" />
	<ul class="forminfo">
	<li><label>主播ID</label><input name="uuid" disabled="true" type="text" class="dfinput" value="{$userdata['uuid']}" /><i>不可修改</i></li>


	<li><label>邀请人编号</label><input name="name" type="text" disabled="true" class="dfinput" value="{$userdata['inviteid']}" /><i></i></li>
	<li><label>邀请人昵称</label><input name="name" type="text" disabled="true" class="dfinput" value="{$userdata['invitename']}" /><i></i></li>
	<li><label>姓名</label><input name="name" type="text" class="dfinput" value="{$userdata['name']}" /><i></i></li>
	<li><label>昵称</label><input name="nickname" type="text" class="dfinput" value="{$userdata['nickname']}" /><i></i></li>

	<li><label>手机号</label><input name="username" type="text" class="dfinput" value="{$userdata['username']}" /><i></i></li>
	<li><label>性别</label>
	<label><input name="sex" type="radio" value="1" <?php if($userdata['sex']==1){echo "checked='checked'";}?> />男</label>
	<label><input name="sex" type="radio" value="2" <?php if($userdata['sex']==2){echo "checked='checked'";}?> />女</label>
	</li>
	<li><label>籍贯</label><input name="city" type="text" class="dfinput" value="{$userdata['city']}"/><i></i></li>
	<li><label>学历</label>
	<label><input name="education" type="radio" value="0" <?php if($userdata['education']==0){echo "checked='checked'";}?> />其他</label>
	<label><input name="education" type="radio" value="1" <?php if($userdata['education']==1){echo "checked='checked'";}?> />专科</label>
	<label><input name="education" type="radio" value="2" <?php if($userdata['education']==2){echo "checked='checked'";}?> />本科</label>
	<label><input name="education" type="radio" value="3" <?php if($userdata['education']==3){echo "checked='checked'";}?> />硕士</label>
	<label><input name="education" type="radio" value="4" <?php if($userdata['education']==4){echo "checked='checked'";}?> />研究生</label>
	<label><input name="education" type="radio" value="5" <?php if($userdata['education']==5){echo "checked='checked'";}?> />博士</label>
	</li>
	<li><label>英语等级</label>
	<label><input name="english" type="radio" value="0" <?php if($userdata['english']==0){echo "checked='checked'";}?> />入门</label>
	<label><input name="english" type="radio" value="1" <?php if($userdata['english']==1){echo "checked='checked'";}?> />GET4</label>
	<label><input name="english" type="radio" value="2" <?php if($userdata['english']==2){echo "checked='checked'";}?> />GET6</label>
	<label><input name="english" type="radio" value="3" <?php if($userdata['english']==3){echo "checked='checked'";}?> />专业6级</label>
	<label><input name="english" type="radio" value="4" <?php if($userdata['english']==4){echo "checked='checked'";}?> />专业8级</label>
	<label><input name="english" type="radio" value="5" <?php if($userdata['english']==5){echo "checked='checked'";}?> />母语级</label>
	</li>
	<li><label>创建时间</label><input name="creationtime" disabled="true" type="text" class="dfinput" value="{$userdata['creationtime']}"/><i></i></li>
	<li><label>是否展示</label>
		<label><input name="is_show" type="radio" value="0" <?php if($userdata['is_show']==0){echo "checked='checked'";}?> />不展示</label>
		<label><input name="is_show" type="radio" value="1" <?php if($userdata['is_show']==1){echo "checked='checked'";}?> />展示</label>
	</li>
	<!-- <li><label style="float: left;">适配文章</label>
	<div style="width: 690px; float: left;">
	<div style="height: 34px;"><label><input id="checkAll" class="checkAll" type="checkbox" checked='checked'/></label></div>
	<div><?php foreach ($labeldata as $key => $value) { ?>
			<label><input name="articles[]" type="checkbox" value="<?php echo $value['label_id'];?>" checked='checked'/><?php echo $value['label_name'];?></label>
	<?php }?>
	</div>
	</div>
	</li> -->
	<li><label style="float: left;">声音年龄标签</label>
	<div style="width: 600px; float: left;">
	<div><?php foreach ($agelabeldata as $key => $value) { ?>
			<label><input name="agelabel[]" type="checkbox" value="<?php echo $value['id'];?>" <?php if(in_array($value['id'],$userdata['agelabel'])){echo " checked='checked'";}?>/><?php echo $value['labelname'];?></label>
	<?php }?>
	</div>
	</div>
	</li>
	<li><label style="float: left;">声音情绪标签</label>
	<div style="width: 600px; float: left;">
	<div><?php foreach ($feellabeldata as $key => $value) { ?>
			<label><input name="feellabel[]" type="checkbox" value="<?php echo $value['id'];?>" <?php if(in_array($value['id'],$userdata['feellabel'])){echo " checked='checked'";}?>/><?php echo $value['labelname'];?></label>
	<?php }?>
	</div>
	</div>
	</li>
	<li><label style="float: left;">声音风格标签</label>
	<div style="width: 600px; float: left;">
	<div><?php foreach ($stylelabeldata as $key => $value) { ?>
			<label><input name="stylelabel[]" type="checkbox" value="<?php echo $value['id'];?>" <?php if(in_array($value['id'],$userdata['stylelabel'])){echo " checked='checked'";}?>/><?php echo $value['labelname'];?></label>
	<?php }?>
	</div>
	</div>
	</li>
	<li>
	<label>讲述类</label>
	<label style="width: 320px;"><audio src="<?php echo "http://audio.heardtech.com/".$uservoice['describe_audio'];?>" controls="controls">您的浏览器不支持 audio 标签。</audio></label>
	<i><input type="checkbox" class="mycheckboxes" <?php echo $uservoice['describe_audio_type']==1?"checked='checked'":""?> name="soundtype[0]" /></i>
	</li>
	<li>
	<label>情感类</label>
	<label style="width: 320px;"><audio src="<?php echo "http://audio.heardtech.com/".$uservoice['emotion_audio'];?>" controls="controls">您的浏览器不支持 audio 标签。</audio></label>
	<i><input type="checkbox" class="mycheckboxes" <?php echo $uservoice['emotion_audio_type']==1?"checked='checked'":""?> name="soundtype[1]" /></i>
	</li>
	<li>
	<label>演绎类</label>
	<label style="width: 320px;"><audio src="<?php echo "http://audio.heardtech.com/".$uservoice['variety_audio'];?>" controls="controls">您的浏览器不支持 audio 标签。</audio></label>
	<i><input type="checkbox" class="mycheckboxes" <?php echo $uservoice['variety_audio_type']==1?"checked='checked'":""?> name="soundtype[2]" /></i>
	</li>
	<li>
	<label>新闻类</label>
	<label style="width: 320px;"><audio src="<?php echo "http://audio.heardtech.com/".$uservoice['news_audio'];?>" controls="controls">您的浏览器不支持 audio 标签。</audio></label>
	<i><input type="checkbox" class="mycheckboxes" <?php echo $uservoice['news_audio_type']==1?"checked='checked'":""?> name="soundtype[3]" /></i>
	</li>
	<!-- <li>
	<label>英文类</label>
	<label style="width: 320px;"><audio src="<?php echo $uservoice['english_audio'];?>" controls="controls">您的浏览器不支持 audio 标签。</audio></label>
	<i><input type="checkbox" class="mycheckboxes" <?php echo $uservoice['english_audio_type']==1?"checked='checked'":""?> name="soundtype[4]" /></i>
	</li> -->
	<?php echo $uservoice['english_audio_type']==1?"<input type='hidden' class='mycheckboxes' checked='checked' name='soundtype[4]' value='on' />":"";?>
	<li>
	<label>10s自我介绍</label>
	<label style="width: 320px;"><audio src="<?php echo "http://audio.heardtech.com/".$uservoice['introduction_audio'];?>" controls="controls">您的浏览器不支持 audio 标签。</audio></label>
	<i><input type="checkbox" class="mycheckboxes" <?php echo $uservoice['introduction_audio_type']==1?"checked='checked'":""?> name="soundtype[5]" /></i>
	</li>
	<li><label>分数</label><input name="level" id="level" type="text" class="dfinput" value="{$userdata['level']}" />
	<cite><b>评级规则：</b><br>
			<?php echo $leveldata[0]['message']."级主播：评分".$leveldata[0]['value']."分以上;<br>";?>
			<?php echo $leveldata[1]['message']."级主播：评分".$leveldata[1]['value']."-".($leveldata[0]['value']-1)."分的;<br>";?>
			<?php echo $leveldata[2]['message']."级主播：评分".$leveldata[2]['value']."-".($leveldata[1]['value']-1)."分的;<br>";?>
	</cite>
	</li>
	<!-- <li><label style="width: 140px;">是否为专职主播</label>
	<label><input name="profession" type="radio" value="0" <?php if($userdata['profession']==0){echo "checked='checked'";}?> />否</label>
	<label><input name="profession" type="radio" value="1" <?php if($userdata['profession']==1){echo "checked='checked'";}?> />是</label>
	</li> -->
	<li><label>&nbsp;</label><input name="" type="button" class="btn postBtn" value="确认保存"/>
		<if condition="$add_del eq 1"><input type="button" class="btn" href="javascript:void(0);" id="inside" value="扣钱"/></if>
	<input type="button" class="btn" href="javascript:void(0);" id="remark" value="备注"/></li>
	<!-- <input type="button" class="btn" href="javascript:void(0);" id="inside" value="收藏"/></li> -->
	</ul>
	  </form>

	</div>


</body>
<script src="__PUBLIC__/js/jquery1.8.3.js"></script>
<script src="__PUBLIC__/layer/layer.js"></script>
<script src="__PUBLIC__/checkbox/js/input.js"></script>
<script src="__PUBLIC__/admin/Js/jquery.combo.select.js"></script>
<script src="__PUBLIC__/js/jquery1.8.3.js"></script>
<script src="__PUBLIC__/layer/layer.js"></script>
<script src="__PUBLIC__/checkbox/js/input.js"></script>

<!-- <script language="javascript" src="__PUBLIC__/admin/sncss/js/jquery-1.11.0.min.js"></script> -->
<script language="javascript" src="__PUBLIC__/admin/sncss/js/ios6switch.min.js"></script>
<script>
$(".mycheckboxes").ios6switch({
	switchoffColor: "#8B9FBA",
	switchoffText: "淘汰",
	switchonText: "达标"
});
$(".checkAll").ios6switch({
	switchoffColor: "#8B9FBA",
	switchoffText: "不选",
	switchonText: "全选"
});
var change = function(sel){
		document.getElementById("fail_message").value = sel.value;
}
</script>
<script type="text/javascript">

$(".postBtn").click(function(){
	var list= $('input:radio[name="timetype"]:checked').val();
	var level= $('#level').val();
	if(level.length==0){
		layer.tips('必须选择打分', '.level');return false;
	}

	$("#formid").submit();
});
</script>
<script type="text/javascript">
$(function() {
	$("#checkAll").click(function() {
		$('input[name="articles[]"]').attr("checked",this.checked);
	});
	var $articles = $("input[name='articles[]']");
	$articles.click(function(){
		$("#checkAll").attr("checked",$articles.length == $("input[name='articles[]']:checked").length ? true : false);
	});
});
</script>
<style type="text/css">
.mainlist{padding:10px;}
</style>

<script type="text/javascript">
$("#inside").click(function(){
	layer.open({title: false, type: 1, area: ['500px', '300px'], //宽高
		content: '<div class="mainlist"><form id="form2" name="form2" method="post" action="/Home/User/user_deduct" onsubmit="return form2_submit();">'
		+'金额：<input type="number" id="deductmoney" name="deductmoney" class="dfinput" value="" /><br><br>'
		+'理由：<input id="note" name="note" class="lginput" value="" />'
		+'<input name="uuid"  type="hidden" class="dfinput" value="{$userdata['uuid']}" /><br><br><div>扣钱理由建议在20个字符以内</div>'
		+'<input name="submit_type" type="submit" class="btn" value="确认扣除"/></form></div>'
	});
	// $('#mediaid').comboSelect();
});
$("#remark").click(function(){
    layer.open({title: false, type: 1, area: ['500px', '300px'], //宽高
        content: '<div class="mainlist">'
		+'<form id="form3" name="form3" method="post" action="/Home/User/user_remark" onsubmit="return form3_submit();">'
        +'备注：<br/><textarea id="remark_content" name="remark_content" rows="3" class="lginput" autofocus="autofocus"></textarea>'
		+'<input type="hidden" name="uuid" class="dfinput" value="{$userdata['uuid']}" /><br><br><div>备注建议在20个字符以内</div>'
        +'<input name="submit_type" type="submit" class="btn" value="确认备注"/></form></div>'
    });
});
</script>
<script type="text/javascript">

	function form2_submit(){
		var deductmoney= $('#deductmoney').val();
		if(deductmoney.length==0){
			alert('必须输入金额');return false;
		}
		var note= $('#note').val();
		if(note.length==0){
			alert('必须输入理由');return false;
		}
	}
	function form3_submit(){
	    var remark_content=$('#remark_content').val();
        if(remark_content.length==0){
            alert('必须输入备注内容');return false;
        }
	}
</script>

</html>
